<template>
  <div class="contact" :style="{ width: props.width }">
    <TitleItem  :required="false" :title="'联系方式'"></TitleItem>
    <slot>
        <!-- list -->
        <div class="contact-list">
            <div class="contact-item" v-for="item in props.list">
                <img class="contact-label" :src="item.icon"/>
                <span class="contact-value">{{item.value}}</span>
              </div>
        </div>
        <!-- button -->
        <BasicButton :title="'立即咨询'" :width="'100%'" :href="'from'"></BasicButton>
    </slot>
  </div>
</template>

<script setup>
const props = defineProps({
  back: {
    type: Boolean,
    required: false,
  },
  width: {
    type: String,
    default: "",
  },
  list: {
    type: Array,
    default: [],
  },
});
</script>

<style scoped lang="scss">
.contact {
  background-color: #fff;
  padding: 40px;
  transition: all 0.5s ease-in-out;
}
.contact:hover{/* x 偏移量 | y 偏移量 | 阴影模糊半径 | 阴影扩散半径 | 阴影颜色 */
  //box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.1);
  //transform:translateY(-3px);

}
//列表
.contact-list{
    margin: 25px 0;
    border-top: $bordershadowgrey;
    .contact-item{
        padding: 20px 0;
        border-bottom: $bordershadowgrey;
        display: flex;
        align-items: center;
        font-size: 18px;
        >img{
            width: 20px;
            height: 20px;
            margin-right: 20px;
            object-fit: contain;
        }
    }
}
</style>
